home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dirut / rmx.zip / RM.DOC < prev   
Text File  |  1988-01-04  |  4KB  |  105 lines

  1. NAME
  2.     rm  - remove files or directories 
  3.  
  4. VERSION
  5.     1.20    January 1988
  6.  
  7. SYNOPSIS
  8.     rm [-?] [-fri[-]] <files>
  9.  
  10. DESCIRPTION
  11.     Rm removes files or directories. Protected ('read-only') files are
  12.     not deleted without permission except under the no complaints mode
  13.     (see option -f).Options can be stacked and can turned off and on for
  14.     selective portions of the command line using the turn on/off feature
  15.     
  16.     An evironment variable lookup is available. Set the environment
  17.     variable "RMOPT" from DOS to your favourite settings.The DOS command:
  18.         set RMOPT=arguments
  19.     will set the environment string to the arguments, which are exactly
  20.     like those by the command itself (including filenames). First the
  21.     environment options are evaluated, filenames given there are deleted
  22.     and then the usual command string is parsed. A typical use would be 
  23.     to put the following command in the autoexec.bat file
  24.  
  25.         set RMOPT=-i
  26.  
  27.     A generic option line would look like:
  28.  
  29.         rm options files option- files option2- files option files
  30.  
  31.     The options apply to files following the options and can be turned
  32.     off by using '-' after the option (see examples).
  33.  
  34.     -?    Give a short usage note. Same as the command without any
  35.         options.
  36.  
  37.     -f[-]    Delete files without complaints. This means that files are 
  38.         deleted even if they are 'read-only'. This does not over-ride
  39.         the 'do not delete directories' feature (I did it this way
  40.         to keep on the safe side). '-f' turns the option on and '-f-'
  41.         turns the option off.
  42.  
  43.     -r[-]    Delete directories recursively. If a directory is encountered 
  44.         it is deleted and all its contents (including subdirectories)
  45.         are deleted. '-r' turns the option on and '-r-' turns the 
  46.         option off. Non-empty directories are not deleted and a 
  47.         warning is given (unless the '-f' switch was on, of course!).
  48.  
  49.     -i[-]    Delete interactively. Queries before deleting every file.
  50.         '-i' turns the option on and '-i-' turns the option off.
  51.     
  52.     -[-]    Use the next argument as a filename. This is to allow use
  53.         of file names which begin with a '-'. '-' turns the option
  54.         on and '--' turns the option off (can't think of any use of
  55.         '--' since it is a noop!).
  56.  
  57.     <files>    Names of files to be deleted. Wild cards are allowed. For 
  58.         names begining with '-' see option '-'. Directories are
  59.         not deleted unless '-r' option is specified.
  60.  
  61. EXAMPLES
  62.     All examples assume that RMOPT is not set to anything.
  63.  
  64.         rm a *.opt
  65.     will delete the file "a" and all files "*.opt". Directories and 
  66.     read-only files will not be deleted.
  67.  
  68.         rm -r dirname
  69.     will delete "dirname" even if it is a directory.
  70.  
  71.         rm -fr a
  72.     will delete "a" whether it is a directory or a read only file.
  73.  
  74.         rm -r dirs1 -r-f dirs2 
  75.     will delete "dirs1" even if it is a directory but will not delete 
  76.     "dirs2" if it is a directory. The option '-r-f' is read as follows
  77.         '-' + 'r-' + 'f' => option symbol + don't delete directories
  78.                     + do everything quietly
  79.         rm - -r
  80.     will delete a file "-r". Note here because of the '-' option "-r"
  81.     is used as a filename rather than as an option.
  82.  
  83. NOTES
  84.     The option on/off feature is not available in Unix(tm).
  85.     The environment option is not available in Unix(tm).
  86.     This version fixes a bug in v1.00 :
  87.         When a nonexistent single file was asked to be deleted
  88.         the program correctly found there was no file but then
  89.         tried to delete the file as if it were read-only.
  90.     This version fixes a bug in v1.10 :
  91.         When a multiple directory deletion was attempted the
  92.         entire disk was wiped out. 
  93.  
  94. BUGS
  95.     Notify all bugs to Q3696@PUCC.BITNET or 
  96.     {seismo, rutgers}\!princeton\!phoenix\!asjoshi.
  97.  
  98. ACKNOWLEDGEMENTS
  99.     The program was written using Turbo C v1.0 (patch 9). The manual
  100.     page for 'rm' for the Silicon Graphics Iris 3020(tm) was used as the
  101.     guideline. The program and this manual page are completly written
  102.     by me.
  103.     Thanks to Forrest Gehrke for pointing out the bug in v1.00.
  104.     Thanks to Dan Jones for pointing out the bug in v1.10
  105.